using CodePlex.TfsLibrary.ObjectModel;
using Xunit;

namespace CodePlex.CodePlexClientLibrary
{
    public class StubCommitView : StubStatusView, ICommitView
    {
        public int ShowComplete_ChangesetId;
        public SourceItemResult ShowItemStatus__Result;
        public SourceItem ShowItemStatus_Item;
        public string TfsServerPath_Value;
        public string TfsServerUrl_Value;

        public string Message
        {
            get { return "This is the message you get back"; }
        }

        public string TfsServerPath
        {
            set { TfsServerPath_Value = value; }
        }

        public string TfsServerUrl
        {
            set { TfsServerUrl_Value = value; }
        }

        public void ShowComplete(int changesetId)
        {
            ShowComplete_ChangesetId = changesetId;
        }

        public void ShowItemStatus(SourceItem item,
                                   SourceItemResult result)
        {
            ShowItemStatus_Item = item;
            ShowItemStatus__Result = result;
        }

        public override bool ShowView()
        {
            Assert.NotEmpty(DisplayItem__Items);
            Assert.NotNull(TfsServerPath_Value);
            Assert.NotNull(TfsServerUrl_Value);

            return base.ShowView();
        }
    }
}